Skip to content

feat(vercel): use -non-reasoning suffix for Grok 4.x when reasoning is disabled#2577

Merged
chrarnoldus merged 7 commits intomainfrom
feat/grok4-non-reasoning-vercel-suffix
Apr 20, 2026
Merged

feat(vercel): use -non-reasoning suffix for Grok 4.x when reasoning is disabled#2577
chrarnoldus merged 7 commits intomainfrom
feat/grok4-non-reasoning-vercel-suffix

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot Bot commented Apr 18, 2026

Summary

  • When a Grok 4.x model (e.g. x-ai/grok-4-fast, x-ai/grok-4.1-fast, x-ai/grok-4.20-beta) is routed to Vercel and reasoning is explicitly disabled, the Vercel model ID now uses the -non-reasoning suffix instead of -reasoning.
  • mapModelIdToVercel accepts a new optional reasoningDisabled parameter (defaults to false); when true and the hardcoded Vercel ID ends with -reasoning, the suffix is replaced with -non-reasoning.
  • Both call sites in vercel/index.ts (shouldRouteToVercel and applyVercelSettings) pass isReasoningExplicitlyDisabled(request) to keep routing checks and model name in sync.

Verification

  • TypeScript environment not fully available locally (missing tsgo/jest binaries); relying on CI.

Visual Changes

N/A

Reviewer Notes

  • The change is additive: non-Grok models and Grok models without reasoning disabled are unaffected.
  • isReasoningExplicitlyDisabled already handles all three request kinds (chat_completions, messages, responses).

@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot Bot commented Apr 18, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (5 files)
  • apps/web/src/app/api/openrouter/embeddings/route.ts
  • apps/web/src/lib/ai-gateway/byok/index.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.ts
  • apps/web/src/routers/byok-router.ts

Reviewed by gpt-5.4-20260305 · 425,593 tokens

@chrarnoldus chrarnoldus merged commit a9bb45e into main Apr 20, 2026
19 checks passed
@chrarnoldus chrarnoldus deleted the feat/grok4-non-reasoning-vercel-suffix branch April 20, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants